/**
 * @file   1090.cpp
 * @author Shuang Hu <hsmath@ubuntu>
 * @date   Sat Apr 17 21:32:18 2021
 * 
 * @brief  PAT advanced 1090,Using DFS method.
 * 
 * @time: 20 minutes!
 */
#include<iostream>
#include<vector>
#include<cmath>
#include<iomanip>
using namespace std;
class Graph{
private:
    vector<vector<int>> AdjTable;
    double rate;
    double price;
    int height;//The maximal height of leaf nodes,H(Root)=0;
    int num;//Maxheight number
    int nodenum;
    int Root;//Root node
public:
    Graph(int a,double b,double c);
    void deepfirst(int node,int height);
    void DFS();
    void print(){
	if(nodenum==1){
	    cout<<fixed<<setprecision(2)<<price<<" 1"<<endl;
	    return;
	}
	double p;
	p=price*pow((1+rate*1.0/100),height);
	cout<<fixed<<setprecision(2)<<p;
	cout<<" "<<num<<endl;
    }
};
void Graph::DFS(){
    deepfirst(Root,0);
}
void Graph::deepfirst(int node,int height){
    if(AdjTable[node].size()==0){//Leaf Node
	if(height>this->height){
	    this->height=height;
	    num=1;
	}else if(height==this->height){
	    num++;
	}
	return;
    }
    for(int i=0;i<AdjTable[node].size();i++){
	int child=AdjTable[node][i];
	deepfirst(child,height+1);
    }
    return;
}
Graph::Graph(int a,double b,double c){
    nodenum=a;
    price=b;
    rate=c;
    AdjTable.resize(nodenum);
    for(int i=0;i<nodenum;i++){
	int node;
	cin>>node;
	if(node==-1){//Root
	    Root=i;
	    continue;
	}
	AdjTable[node].push_back(i);//Register the AdjTable
    }
    height=0;
    num=1;
}
int main(){
    int a;
    double b,c;
    cin>>a>>b>>c;
    Graph G(a,b,c);
    G.DFS();
    G.print();
}
